<div id="contentwrapper" class="contentwrapper">

	<div class="three_fourth" style="overflow:hidden;margin-right:0px;margin-bottom:150px;">
		<div class="indexes" id="J_indexes">
			
		</div>
		<br class="clearall"/>
		<div class="chart-area basic-info" style="margin-top:15px;">
			<div style="overflow:hidden;" class="filemgr_category">
             	<ul style="float:left;display:block;" id="indicators" >
                     <li class="current"><a href="javascript:void(0);" rel="cost">花费</a></li>
                     <li class="current"><a href="javascript:void(0);" rel="sales">成交</a></li>
                     <li class="current"><a href="javascript:void(0);" rel="impressions">展现量</a></li>
                     <li class="current"><a href="javascript:void(0);" rel="click">点击量</a></li>
                     <li><a href="javascript:void(0);" rel="ctr">点击率</a></li>
                     <li><a href="javascript:void(0);" rel="roi">投入产出比</a></li>
                     <li><a href="javascript:void(0);" rel="cpc">平均点击花费</a></li>
                     <li><a href="javascript:void(0);" rel="cpm">千次展现花费</a></li>
                 </ul>
                 <div id="J_datepicker" style="float:right;margin-right:20px;"></div>
             </div>	
             
             <div id="chartplace" style="height: 360px; padding: 0px; position:relative;">
             </div>
         
		</div>
	</div>


	<div class="one_fourth last mtop" style="float:right;">
        <if condition=" $campaign.auto_type eq 1">
        <div class="todo" id="J_mode">
            <ul id="smart_mode">
                <li data-mode="quick_schedule" class="todo-done" style="margin-top: 7px;">
                <div class="todo-icon fui-user">
                    <img src="/Img/mode1-2.png">
                </div>
                <div class="todo-content">
                    <h5 class="todo-name">
                        <strong>一键推广计划</strong>
                    </h5>
                </div>
                </li>
            </ul>
        </div>
        </if>
        
		<div class="widgetbox">
			<h2 class="title">【{$campaign.title}】推广设置</h2>
            <div class="row hidden">
                <label>推广计划类型</label>
                <span class="label label-important">一键推广计划</span>
            </div>
			<form action="/campaign/update" method="post" id="frm_campaign_budget" >
			<input type="hidden" name="campaign_id" value="{$campaign.campaign_id}" />
			<div class="row">
				<label>推广计划状态</label>
		        <div class="field" style="margin:5px 0px;">
		            <p class="field switch small-switch">
		                <label data-value="online" class="cb-enable <if condition="$campaign.online_status eq 'online'">selected</if>"><span>启动推广</span></label>
		                <label data-value="offline" class="cb-disable <if condition="$campaign.online_status neq 'online'">selected</if>"><span>暂停推广</span></label>
		                <input type="hidden" data-value="aaa" name="campaign_status" value="{$campaign.online_status}"/>
		            </p>  
		        </div>
			</div>
			
			
			<div class="row">
	   			<div class="row" style="position:relative;">
		   			<label>推广计划名称</label>  <small style="display:inline" class="desc">(不超过16个汉字)</small>
		   			 <span id="adderror"></span>
		   			 <div class="field">
						 <input id="I_campaigntitle" type="text" name="campaign_title" value="{$campaign.title}" style="width:90%;"/>
				 </div>
	   			 </div>		
			</div>
			
			<div class="row">
			     <label>推广计划日限额</label>
			    <br class="clearall">
			    <div class="input-prepend" style="margin-top:5px;">
					<span class="add-on">￥</span>
					<input type="text" value="{$campaign.budget}" id="I_campaignbudget" name="budget" class="width100 currencyinput" style="font-weight:bold;font-size:18px;color:#229fdd;" />
				</div>
			<br class="clearall">
			</div>


            <if condition="$campaign.auto_type eq 1">
			<div class="row">
			     <label>关键词最高限价</label><small style="display:inline" class="desc important">(自动开车时的最高限价，过低限价可能会影响自动开车效果，推荐不限价设为0)</small>
			    <br class="clearall">
			    <div class="input-prepend" style="margin-top:5px;">
					<span class="add-on">￥</span>
                    <input type="text" value="{$campaign['limit'] / 100}" id="I_keywordlimit" name="keyword_limit" class="width100 currencyinput" style="font-weight:bold;font-size:18px;color:#229fdd;" />
				</div>
			</div>

			<br class="clearall">
            </if>


			<div class="row">
				<a style="margin:5px;display:none;" href="javascript:void(0);" class="newfilebutton" id="J_savebtn">保存修改</a>
				<span id="J_saveinfo"></span>
			</div>
			</form>
			
					
		</div>
   		
   			
	</div>


</div>


<script type="text/html" id="template_indexes_tpl">
	<div class="stat one_sixth">
		<div class="stat-indicator" data-field="pv">
			<div class="number green" ><%= summary.impressions %></div>
			<div class="title"><a original-title="浏览量表示宝贝被搜索展现的次数，趋势变化为同期对比数据" href="javascript:void(0);" class="faq">浏览量</a></div>
		</div>
		<div class="stat-trend">
		<% if( compare.impressions != undefined ) { %>
			<% if( compare.impressions >= 0 ){ %>
			<div class="arrow">
				<img src="/Img/uparrow.png">
			</div>
			<div class="percent summary green"><%= percent( compare.impressions ) %>%</div>

			<% }else{ %>
			<div class="arrow">
				<img src="/Img/downarrow.png">
			</div>
			<div class="percent summary red"><%= abs( percent(compare.impressions) ) %>%</div>
			<% } %>
		<% } %>
		</div>
	</div>

	<div class="stat one_sixth">
		<div class="stat-indicator" data-field="click">
			<div class="number green summary"><%= summary.click %></div>
			<div class="title"><a original-title="点击量表示宝贝被点击的次数，趋势变化为同期对比数据" href="javascript:void(0);" class="faq">点击量</a></div>
		</div>
		<div class="stat-trend">
		<% if( compare.click != undefined ) { %>
			<% if( compare.click >= 0 ){ %>
			<div class="arrow">
				<img src="/Img/uparrow.png">
			</div>
			<div class="percent summary green"><%= abs( percent( compare.click ) ) %>%</div>

			<% }else{ %>
			<div class="arrow">
				<img src="/Img/downarrow.png">
			</div>
			<div class="percent summary red"><%= abs( percent(compare.click) ) %>%</div>
			<% } %>
		<% } %>
		</div>
	</div>

	<div class="stat one_sixth">
		<div class="stat-indicator" data-field="cpc">
			<div class="number green summary">￥<%= summary.cpc %></div>
			<div class="title"><a original-title="点击单价表示宝贝每次被点击的平均单价，趋势变化为同期对比数据" href="javascript:void(0);" class="faq">点击单价</a></div>
		</div>
		<div class="stat-trend">
		<% if( compare.cpc != undefined ) { %>
			<% if( compare.cpc >= 0 ){ %>
			<div class="arrow">
				<img src="/Img/uparrow.png">
			</div>
			<div class="percent summary green"><%= percent( compare.cpc ) %>%</div>

			<% }else{ %>
			<div class="arrow">
				<img src="/Img/downarrow.png">
			</div>
			<div class="percent summary red"><%= abs( percent(compare.cpc) ) %>%</div>
			<% } %>
		<% } %>
		</div>
	</div>

	<div class="stat one_sixth">
		<div class="stat-indicator" data-field="cost">
			<div class="number green summary">￥<%= summary.cost %></div>
			<div class="title"><a original-title="花费表示选定时间时间内的总花费，趋势变化为同比数据" href="javascript:void(0);" class="faq">花费</a></div>
		</div>
		<div class="stat-trend" data-field="cost">
		<% if( compare.cost != undefined ) { %>
			<% if( compare.cost >= 0 ){ %>
			<div class="arrow">
				<img src="/Img/uparrow.png">
			</div>
			<div class="percent summary green"><%= percent( compare.cost ) %>%</div>

			<% }else{ %>
			<div class="arrow">
				<img src="/Img/downarrow.png">
			</div>
			<div class="percent summary red"><%= abs( percent(compare.cost) ) %>%</div>
			<% } %>
		<% } %>
		</div>
	</div>

	<div class="stat one_sixth">
		<div class="stat-indicator" data-field="sales">
			<div class="number green summary">￥<%= summary.sales %></div>
			<div class="title"><a original-title="销售额表示选定时间内的总销售额，趋势变化为同比数据" href="javascript:void(0);" class="faq">销售额</a></div>
		</div>
		<div class="stat-trend" data-field="sales">
		<% if( compare.sales != undefined ) { %>
			<% if( compare.sales >= 0 ){ %>
			<div class="arrow">
				<img src="/Img/uparrow.png">
			</div>
			<div class="percent summary green"><%= percent( compare.sales ) %>%</div>

			<% }else{ %>
			<div class="arrow">
				<img src="/Img/downarrow.png">
			</div>
			<div class="percent summary red"><%= abs( percent(compare.sales) ) %>%</div>
			<% } %>
		<% } %>
		</div>
	</div>

	<div class="stat one_sixth last">
		<div class="stat-indicator" data-field="roi">
			<div class="number green summary"><%= summary.roi %></div>
			<div class="title"><a original-title="投资回报率表示用户选定时段内总销售和总花费的比值，趋势变化为同期对比数据" href="javascript:void(0);" class="faq">投资回报率</a></div>
		</div>
		<div class="stat-trend" data-field="roi">
			<% if( compare.roi != undefined ) { %>
				<% if( compare.roi > 0 ){ %>
				<div class="arrow">
					<img src="/Img/uparrow.png">
				</div>
				<div class="percent summary green"><%= percent( compare.roi ) %>%</div>

				<% }else{ %>
				<div class="arrow">
					<img src="/Img/downarrow.png">
				</div>
				<div class="percent summary red"><%= abs( percent(compare.roi) ) %>%</div>
				<% } %>

			<%}%>
		</div>
	</div>

</script>


